<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<link href="${ctx}/styles/extremetable/extremecomponents.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/styles/extremetable/style.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/grid.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/show.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/rightmenu2.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/extremetable/extremecomponents.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/common/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script>
function showDetail(reasonId,type)
{
	var url = "${ctx}/house_partnershipAction.do?method=getReasonDetail&id="+reasonId+"&type="+type;
	var mytitle = null;
	if(type == "checkHouse")
	{
		mytitle = "${key.checkHouseTitle}";
	}
	else if(type == "copyMeter")
	{
		mytitle = "${key.copyMeterTitle}";
	}
	else if(type = "goodsTransfer")
	{
		mytitle = "${key.goodsTransferTitle}";
	}
	top.windowOpen(url,'showDetail',mytitle,230,450);
}
function setReason(recordId,type)
{
	parent.setReason(recordId,type);
}
function getPageNO()
{
	return document.getElementById("ec_p").value;
}


</script>
</head>
<body onload="init()">
<ec:ceTable items="reasonList"
	action="${ctx}/house_partnershipAction.do?method=findAllReasonBySearch"
	var="reasonItem"
	view="pmsview"
	styleClass="gridData2"
	rowsDisplayed="15">
	<ec:ceRow styleClass="grid"  onclick="setReason('${reasonItem.id}','${reasonItem.types}')" ondblclick="showDetail('${reasonItem.id}','${reasonItem.types}')" onContextMenu="return ShowContextMenu(event,'quick_rightmenu')">
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.exceptionName}" property="name"  width="12%">
				<c:out value='${reasonItem.name}'/>
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.exceptionDescription}" property="description"  width="50%">
				<c:out value='${reasonItem.description}'/>
		</ec:ceColumn>
		<ec:ceColumn headerCell="pmsHeadrCell" title="${key.seqNo}" property="seqNo" value="${reasonItem.seqNo}" width="6%" sortable="true"/>
	</ec:ceRow>
	<ec:parameter name ="name" value=""></ec:parameter>
	<ec:parameter name = "types" value=""></ec:parameter>
</ec:ceTable>

<div id="quick_rightmenu" style="display:none;" oncontextmenu="return false" class="quick_rightmenu" >
<table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg">

	<tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0">
       <tr>
		  <td class="quickMenu_toolbarico"><a href="#" onMouseOver="show2menu('quick_rightmenu2',this,event,'quick_rightmenu')" onMouseOut="hidden2menu('quick_rightmenu2')"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="${key.add}"/>${key.add}<img src="${ctx}/images/ico_index_start1.gif" border="0" /></a></td>
          </tr>
          <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.editReason();return false;" onfocus="this.blur()"><img src="${ctx}/images/ico_amend.gif" border="0" align="absbottom" alt="${key.modify}"/> ${key.modify}</a></td>
          </tr>
		  <tr>
          <td class="quickMenu_toolbarico"><a href="#"  onclick="parent.showDeleteReason();return false;" onfocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" border="0" align="absbottom" alt="${key.delete}"/> ${key.delete}</a></td>
          </tr>
      </table></td>
    </tr>
  </table>
</div>


<div id="quick_rightmenu2" class="quick_menu2" style="display:none;">
  <table width="100%" border="0" cellpadding="1" cellspacing="0" class="grid_quickMenu_bg" onMouseOver="showmy2menu('quick_rightmenu2')" onMouseOut="hidden2menu('quick_rightmenu2')">
       <tr>
      <td>
	  <table width="100%" border="0" cellpadding="2" cellspacing="0">
	    <tr>
         <td class="quickMenu_toolbarico"><a href="#" onClick="parent.openReason('copyMeter');return false;" onFocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" alt="${key.copyMeterAdd}" border="0" align="absbottom"/>${key.copyMeterAdd}</a></td>
          </tr>
        <tr>
         <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.openReason('checkHouse');return false;"><img src="${ctx}/images/ico_newfile.gif" alt="${key.checkHouseAdd}" border="0" align="absbottom"/>${key.checkHouseAdd}</a></td>
          </tr>
		  <tr>
         <td class="quickMenu_toolbarico"><a href="#" onFocus="this.blur()" onClick="parent.openReason('goodsTransfer');return false;"><img src="${ctx}/images/ico_newfile.gif" alt="${key.goodsTransfer}" border="0" align="absbottom"/> ${key.goodsTransfer}</a></td>
          </tr>
      </table></td>
    </tr>
  </table>
</div>
<script>
function init()
{
	var obj = findFrame('main');
	var n = obj.$F('reasonName');
	var t = obj.$F('types');
	$('name').value = n;
	$('types').value = t;
	parent.window.document.all('connTabPanel').style.height=document.body.scrollHeight;

}
</script>
</body>
</html>